export interface WorldServerOptions {
    //服务ID
    worldServerId: string,
    //主服务器地址
    masterServerUrl: string
    //端口号
    port: number,
    //本机地址
    ip: string,
    //需要负责的共公关卡场景列表
    publicSubWorldList: string[],
    //可以负责的私有关卡场景列表
    privateSubWorldList: string[],
}

// ============Configuration begin=======================
const masterServerPort = 3000;
const masterServerUrl = 'http://127.0.0.1:' + masterServerPort;

let worldServerConfList = [
    {
        worldServerId: '1',
        masterServerUrl: masterServerUrl,
        port: 3001,
        ip: '127.0.0.1',
        publicSubWorldList: [],
        privateSubWorldList: ['lobby', 'billiards', 'gomoku'],
    },
    {
        worldServerId: '2',
        masterServerUrl: masterServerUrl,
        port: 3002,
        ip: '127.0.0.1',
        publicSubWorldList: [],
        privateSubWorldList: ['billiards-2'],
    },
];
//===========================end===============================

const worldServerConfMap = new Map<string, WorldServerOptions>();
worldServerConfList.forEach(v => {
    worldServerConfMap.set(v.worldServerId, v);
});

export { masterServerPort, masterServerUrl, worldServerConfList, worldServerConfMap }